package com.mindskip.xzs.repository;

import com.mindskip.xzs.domain.VideoUser;
import com.mindskip.xzs.viewmodel.admin.education.VideoUserPageRequestVM;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author changjiang
 * @Title:
 * @Package
 * @Description: 视频添加
 */
@Mapper
public interface VideoUserMapper extends BaseMapper<VideoUser> {

    /**
     *  获取视频进度列表
     * @param videoUser
     * @return
     */
    List<VideoUser> getVideoUserList(VideoUser videoUser);

    /**
     * 根据用户ID和视频id获取信息
     * @param videoUser
     * @return
     */
    VideoUser getForUserIdAndVideoId(VideoUser videoUser);


    /**
     * 获取进度列表分页
     * @param requestVM
     * @return
     */
    List<VideoUser> getVideoUserListPage(VideoUserPageRequestVM requestVM);

    /**
     * 统计时间
     * @param videoUser
     * @return
     */
    int countTime(VideoUser videoUser);


    /**
     * 统计视频时间
     * @param videoUser
     * @return
     */
    int countTimeVideo(VideoUser videoUser);


    int deleteByPrimaryKey(Long id);


    @Override
    int insertSelective(VideoUser videoUser);

    @Override
    int updateByPrimaryKeySelective(VideoUser videoUser);

    @Override
    int updateByPrimaryKey(VideoUser videoUser);

    /**
     *  获取视频进度列表
     * @param videoUser
     * @return
     */
    List<VideoUser> getVideoUserListForUid(VideoUser videoUser);





}
